package com.imelite.qyh.util;

import java.util.Calendar;
import java.util.Date;

public class DateUtil {

    /**
     * 指定时间的X分钟之后
     * @param date
     * @return
     */
    public static Date getTimeAfterByMIN(Date date,int min){
        Calendar ca=Calendar.getInstance();
        ca.setTime(date);
        ca.add(Calendar.MINUTE,min);
        return ca.getTime();
    }

    /**
     * start是否在end之前
     * @param start
     * @param end
     * @return
     */
    public static boolean before(Date start,Date end){
        if (start.before(end)){
            return true;
        }else{
            return false;
        }
    }
}
